package com.sp.demo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ContextUtil {
	
	public static ApplicationContext getContext(){
		ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
		return context;
	}
	
	public static Object getObjectBean(String beanStr){
		return getContext().getBean(beanStr);
	}
}
